# !/usr/bin/env python
# -*- coding:utf-8 -*-
# @FileName  :run_cases.py
# @Time      :2024/12/5 11:18:19
# @Author    :flower
import os

import pytest
import os


if __name__ == '__main__':
    if os.name == 'nt':
        # 生成Allure报告的json文件
        pytest.main(["--alluredir=allure-results"])
        os.system('allure generate allure-results -o allure-reports --clean')
        os.system('allure serve --port 9090 allure-results')
    else:
        # 生成Allure报告的json文件
        pytest.main(["--alluredir=allure-results"])
        # Jenkins Allure插件会自动收集allure-results然后生成测试报告
        # os.system('allure generate allure-results -o allure-reports --clean')
